package com.marsproj.bankingmanagesystem.dao;

import com.marsproj.bankingmanagesystem.entity.Flow;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface FlowDao {

    @Insert("insert into flow (domid,subid,type,dealMoney,dealTime,remark) values (#{domid},#{subid},#{type},#{dealMoney},#{dealTime},#{remark})")
    public int addFlow(Flow flow);

    @Select("select * from flow where domid = #{id}")
    public List<Flow> queryFlow(String id);

}